package com.originskyseed.platform.user.service;

import java.util.List;
import java.util.Map;

import com.originskyseed.platform.core.base.BasePage;
import com.originskyseed.platform.user.model.PlayerRelateLogin;

/**
 * 玩家登录信息表Service接口类（OSI_PLAYER_RELATE_LOGIN）
 *
 * @author wlj
 */
public interface IPlayerRelateLoginService {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(PlayerRelateLogin record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(PlayerRelateLogin record) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(PlayerRelateLogin record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(PlayerRelateLogin record) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public PlayerRelateLogin selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<PlayerRelateLogin> selectList(PlayerRelateLogin record) throws Exception;

	/**
	 * 通过账号查询列表
	 *
	 * @param account
	 * @return
	 * @throws Exception
	 */
	public List<PlayerRelateLogin> selectListByAccout(String account) throws Exception;

	/**
	 * 统计账号登录次数
	 * 
	 * @param account
	 * @return
	 * @throws Exception
	 */
	public int loginCountByAccout(String account) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<PlayerRelateLogin> selectListByPage(Map<String, Object> params, BasePage<PlayerRelateLogin> page) throws Exception;


	/**
	 * 活跃登陆
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<PlayerRelateLogin> selectActiveLoginUserByPage(Map<String, Object> params, BasePage<PlayerRelateLogin> page) throws Exception;
		/**
         * 批量插入记录
         *
         * @param list
         * @return
         * @throws Exception
         */
	public int insertBatch(List<PlayerRelateLogin> list) throws Exception;


	/**
	 * 批量插入记录
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public int insertBatch(String tenantCode,List<PlayerRelateLogin> list) throws Exception;

	/**
	 * 查询玩家id和时间是否存在
	 * 
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public List<PlayerRelateLogin> selectPlayerIds(List<PlayerRelateLogin> list) throws Exception;


	/**
	 * 查询玩家id和时间是否存在
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public List<PlayerRelateLogin> selectPlayerIds(String tenantCode,List<PlayerRelateLogin> list) throws Exception;
}
